-
-
"GUI events also travel up the scene tree but, since these events target specific Controls, only direct ancestors of the targeted Control node receive the event.".
-
Regarding Pickable Objects:
-
For reasons I don't understand, this implies that all control nodes directly above the node you want to detect as Pickable must be set to Ignore or Pass.
-
It is not necessary to set Ignore or Pass for other nodes, only those that are directly above the current one; that is, it is not necessary to set the node's "siblings".
-
-
-
-
Input: Create a Buffer for 'attack combos' with 'attack_points' .
Mouse
-
-
Great video.
-
{2:33}
-
At the end of the video he shows how to change the cursor depending on context, adding variations to the cursor.
-
-
About cursor scale problem:
-
"I pre-rendered the cursor at integer multiples of the base resolution (640x360 in my case) and then at runtime call "OS.window_size" to see what resolution the game is running at (works for both windowed and fullscreen despite the name) and then pick the cursor that is the closest multiple from the base resolution. Not perfect for screens with odd resolutions, but can cover the most common sizes since 640x360 is a perfect multiple of 720, 1080, 1440, and 4k".
-
-
Inventory
-
Without grid:
-
-
Creates a fairly complete inventory.
-
The video author explains poorly and is dull, but created okay systems.
-
I have some random criticisms, but I'm too lazy to explain.
-
-
-
Bad video, ted-talk style, with a lot of useless content and a confusing system.
-
-
Grid:
-
-
It's a very slow tutorial and there is no initial clarification about what is being done. The rest of the video is better.
-
Watch the video from {51:00}.
-
System:
-
Grid / "Slot":
-
The grid visuals are separated from the grid functionality. "Slots" are not used.
-
The 'visual grid' is defined as a stretched tile texture with 'texture repeat' enabled; so it's just a background texture.
-
The 'logical grid' is defined as segmentation of the texture region, using a 'cell_size'.
-
-
Items:
-
Item placement is done by placing an "item" in an arbitrary region of space within the region defined by the grid. Everything is loose, but it tries to maintain the pseudo-segmentation generated by 'cell_size'.
-
{23:30}
-
Item definition.
-
-
-
"scans the grid and marks all slots as occupied".
-
The item's "origin" is stored, so when clicking an occupied tile, the 'grab' is done from that 'origin'.
-
-
-
-
It's a very long video with questionable dynamic-typed code.
-
System:
-
The grid is built by instancing many "Slot" scenes.
-
A Slot is defined as a Control.
-
Each item is defined as a Node2D, which is odd.
-
"scans the grid and marks all slots as occupied".
-
-
The video and method are very questionable.
-
-
-
Does not support:
-
Rotation.
-
Placing an item outside the predefined grid.
-
Scroll.
-
Swap items by clicking on top of an item exists.
-
-
System:
-
Very simple.
-
-
Not recommended, because it's not in Godot and lacks clarity.
-
-
-
Old video with poor Godot programming.
-
System:
-
The grid is built using a procedural rectangle, disconnected from visuals (as I recall).
-
{16:00} "scans the grid and marks all slots as occupied".
-
-
-
-
An "inventory manager" is created without using Godot's drag-and-drop functions.
-
Uses very poor code.
-
The video is completely irrelevant and very long.
-
-
-
Just a devlog with no explanation. The shown code is terribly disorganized and very poor.
-
-
-
Just a showcase. The system looks flawed.
-
-
-
Terrible video.
-
-
Inspirations:
-
Drag
-
It is not possible to use the function
set_drag_preview()if a "drag" defined by Godot is not being performed.-
In the example below, the server asks the client to perform a drag, but this cannot be executed by the client since it is not performing the native Godot drag.
@rpc func _request_set_preview(slot_com_item_path : NodePath) -> void: var slot_com_item : Slot = get_node(slot_com_item_path) if not slot_com_item: return var preview : ItemPreview = _PREVIEW_SCENE.instantiate() preview.set_textura(slot_com_item.get_item().textura, slot_com_item.get_item().tamanho) set_drag_preview(preview) -
-
Drag: Built-in 'Drag and Drop' functions .
-
Godot 4.x: _get_drag_data(), _can_drop_data(), _drop_data().
-
-
Drag: Differences between drag methods using Control Nodes and 2D Nodes .
-
For Control Nodes use the virtual functions '_get_drag_data()', etc.
-
For 2D Nodes ~'something manual is implemented'.
-